import request from '@/utils/request';

enum ApiPath {
  GetPageList = '/admin/user',
  Lock = '/admin/user/lock',
  Show = '/admin/user/show',
  Approval = '/admin/user/approval',
  
}
// 获取用户列表
export const reqGetPageList = (page: number, limit: number, searchObj: any) => {
  return request.get<any, any>(`${ApiPath.GetPageList}/${page}/${limit}`, {params: searchObj})
};

// 锁定/解锁用户
export const reqLock = (id: number, status: number) => {
  return request.get<any, any>(`${ApiPath.Lock}/${id}/${status}`)
};

// 获取用户详情
export const reqShow = (id: number): any => {
  return request.get<any, any>(`${ApiPath.Show}/${id}`)
};